Needed for MobileFrontend on third-party sites that use this feature.
Ideally, there should be a way to cache mobile requests too, but that's
a different issue requiring much more effort to do properly.
Bug: 68106
Change-Id: I01a76c571d9186b325f19a00cec136459707c791
$rev: Revision object
&$links: Array of HTML links
+'HTMLFileCache::useFileCache': Override whether a page should be cached in file
+cache.
+$context: An IContextSource object with information about the request being served.
+
'ImageBeforeProduceHTML': Called before producing the HTML created by a wiki
image insertion. You can skip the default logic entirely by returning false, or
just modify a few things using call-by-reference.
$clang = $wgContLang->getCode();
// Check that there are no other sources of variation
- return !$user->getId() && !$user->getNewtalk() && $ulang == $clang;
+ if ( $user->getId() || $user->getNewtalk() || $ulang != $clang ) {
+ return false;
+ }
+ // Allow extensions to disable caching
+ return wfRunHooks( 'HTMLFileCache::useFileCache', array( $context ) );
}
/**